package com.example.sth0409.tablayoutdemo;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by STH0409 on 2017/5/29.
 */

public class StringBean implements Parcelable {
    private List<String> stringList;

    public StringBean(List<String> stringList) {
        this.stringList = stringList;
    }

    public StringBean() {

    }

    public List<String> getStringList() {
        return stringList;
    }

    public void setStringList(List<String> stringList) {
        this.stringList = stringList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeStringList(this.stringList);
    }

    protected StringBean(Parcel in) {
        this.stringList = in.createStringArrayList();
    }

    public static final Parcelable.Creator<StringBean> CREATOR = new Parcelable.Creator<StringBean>() {
        @Override
        public StringBean createFromParcel(Parcel source) {
            return new StringBean(source);
        }

        @Override
        public StringBean[] newArray(int size) {
            return new StringBean[size];
        }
    };
}
